<?php

/**
 * @file
 * Default theme implementation to display a single Drupal page.
 *
 * Available variables:
 *
 * General utility variables:
 * - $base_path: The base URL path of the Drupal installation. At the very
 *   least, this will always default to /.
 * - $directory: The directory the templatuser-menue is located in, e.g. modules/system
 *   or themes/bartik.
 * - $is_front: TRUE if the current page is the front page.
 * - $logged_in: TRUE if the user is registered and signed in.
 * - $is_admin: TRUE if the user has permission to access administration pages.
 *
 * Site identity:
 * - $front_page: The URL of the front page. Use this instead of $base_path,
 *   when linking to the front page. This includes the language domain or
 *   prefix.
 * - $logo: The path to the logo image, as defined in theme configuration.
 * - $site_name: The name of the site, empty when display has been disabled
 *   in theme settings.
 * - $site_slogan: The slogan of the site, empty when display has been disabled
 *   in theme settings.
 *
 * Navigation:
 * - $main_menu (array): An array containing the Main menu links for the
 *   site, if they have been configured.
 * - $secondary_menu (array): An array containing the Secondary menu links for
 *   the site, if they have been configured.
 * - $breadcrumb: The breadcrumb trail for the current page.
 *
 * Page content (in order of occurrence in the default page.tpl.php):
 * - $title_prefix (array): An array containing additional output populated by
 *   modules, intended to be displayed in front of the main title tag that
 *   appears in the template.
 * - $title: The page title, for use in the actual HTML content.
 * - $title_suffix (array): An array containing additional output populated by
 *   modules, intended to be displayed after the main title tag that appears in
 *   the template.
 * - $messages: HTML for status and error messages. Should be displayed
 *   prominently.
 * - $tabs (array): Tabs linking to any sub-pages beneath the current page
 *   (e.g., the view and edit tabs when displaying a node).
 * - $action_links (array): Actions local to the page, such as 'Add menu' on the
 *   menu administration interface.
 * - $feed_icons: A string of all feed icons for the current page.
 * - $node: The node object, if there is an automatically-loaded node
 *   associated with the page, and the node ID is the second argument
 *   in the page's path (e.g. node/12345 and node/12345/revisions, but not
 *   comment/reply/12345).
 *
 * Regions:
 * - $page['help']: Dynamic help text, mostly for admin pages.
 * - $page['highlighted']: Items for the highlighted content region.
 * - $page['content']: The main content of the current page.
 * - $page['sidebar_first']: Items for the first sidebar.
 * - $page['sidebar_second']: Items for the second sidebar.
 * - $page['header']: Items for the header region.
 * - $page['footer']: Items for the footer region.
 *
 * @see template_preprocess()
 * @see template_preprocess_page()
 * @see template_process()
 */
?>

<?php 
     drupal_add_js(drupal_get_path('module', 'cproduct') . '/js/scripts.js');
        drupal_add_js(drupal_get_path('module', 'cproduct') . '/js/jcarousel.js');
        drupal_add_css(drupal_get_path('module', 'cproduct') . '/css/jcarousel.css');
        
        drupal_add_js(drupal_get_path('module', 'cproduct') . '/js/jquery.jqzoom-core.js');
        drupal_add_css(drupal_get_path('module', 'cproduct') . '/css/jquery.jqzoom.css');
?>
<div id="page-wrapper">
    <div id="topBar" class="ovfWidth">
        <div>
            <nav id="user-menu">
                <?php if(user_is_anonymous()){
                    echo '<li id="login"><a href="'.url("user/login").'">Đăng nhập</a></li>';
                    echo '<li id="loginFB"><a href="http://facebook.com"><img src="/sites/all/themes/chon/images/login-fb.jpg" /></a></li>';
                }else{
                    echo '<li>'.$GLOBALS['user']->name.'</li>';
                }
                echo '<li id="show-cart"><a href="'.url("carts").'">Giỏ hàng (37)</a><div id="carts">'.display_block_cart().'</div></li>';

                ?>
            </nav>
        </div>
    </div>
    <header id="page-header" class="ovfWidth">
        <div>
            <a id="logo" href="<?php echo $front_page;?>"><img src="<?php echo $logo; ?>"/></a>

            <div id="custom-search">
                <input placeholder="Nhập tên thương hiệu, mã hàng hoặc đặc điểm sản phẩm" type="text" id="txt-custom-search" />
                <div id="custom-search-result"></div>
            </div>

            <div id="topHotline">
                Hotline:
                <p>0909-432-837</p>
            </div>

            <div id="social-network">
                Chia sẻ:
                <div>
                    <a class="snFB" href="#"></a>
                    <a class="snTW" href="#"></a>
                    <a class="snGG" href="#"></a>
                </div>
            </div>
        </div>
    </header>
    
    <nav id="main-nav" class="fixedWidth">
        <?php 
                display_custom_menu();
        ?>
        <?php // print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'ul-sub-main-menu', 'class' => array('links', 'inline', 'clearfix')))); ?>
    </nav>

    <div id="sub-nav" class="fixedWidth">
        <ul>
            <li><a href="#">Giới thiệu</a></li>
            <li><a href="#">Hướng dẫn mua hàng</a></li>
            <li><a href="#">Hỏi đáp</a></li>
            <li><a href="#">Điều khoản</a></li>
            <li><a href="#">Đối tác</a></li>
            <li><a href="#">Liên lạc</a></li>
        </ul>
    </div>

    <div id="page-breadcrumb" class="fixedWidth">
        Breadcrumb
    </div>
    
    <div id="main-content" class="fixedWidth">
        <?php if ($messages) print '<div id="message">' . $messages . '</div>'; ?>
        <?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
        <?php if ($tabs): ?><div id="tabs"><?php print render($tabs); ?></div><?php endif; ?>
        <?php  print render($page['content']); ?>			
    </div>
    <footer id="main-footer" class="fixedWidth">
        <?php print render($page['footer']); ?>
        <div id="copyright">
            Bản quyền © 2014 onshopping.vn - Bản quyền được bảo vệ<br/>
            Công ty TNHH Onshopping, 123 Lê Văn Sỹ, P.13, Q.3 – ĐT: (08) 3526 4733 – Fax: (08) 3526 4736<br/>
            Giấy phép số 49/GP - ICP - STTT cấp ngày 11/06/2012 do sở thông tin truyền thông TP.HCM cấp<br/>
            Giấy chứng nhận ĐKKD số 0310257037 do Sở Kế hoạch và đầu tư Thành phố Hồ Chí Minh cấp lần đầu ngày 17/8/2010<br/>
            và đăng ký thay đổi lần thứ 4 ngày 12/3/2013.
        </div>
    </footer>
</div>